package com.javaclimb.mappers;

import com.javaclimb.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;
import java.util.List;

@Mapper
public interface CommentMapper {
    /*新增评论*/
    int insetComment(Comment comment);
    /*根据古树id查询评论*/
    List<Comment> selectCommentByTreeId(Integer treeId);
    /*删除评论*/
    int deleteComment(Integer id);
    /*评论点赞*/
    int addLike(Integer id);
    /*根据评论id*/
    Comment checkIsComment(Integer userId, Integer treeId);

    List<Comment> list(Integer id);

    List<Comment> listAll(Integer id, Integer userId, Integer treeId, Date startTime, Date endTime);

    void deleteComments(List<Integer> ids);
}
